from tabulate import tabulate

data = [["Alice",24,"Engineer"],["Bob",30,"Doctor"],["Charlie",22,"Artist"]]
headers = ["Name","Age","Occupation"]

print(tabulate(data,headers=headers,tablefmt="grid"))